package org.example.test_03.Controller;

import org.example.test_03.Domian.ReturnData;
import org.example.test_03.Service.UploadFileService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * @Author lands
 * @Date 2024/8/19 16:38
 * @Description TODO
 */
@RestController
public class UploadFileController {
    @Resource
    UploadFileService uploadFileService;



    @PostMapping("/uploadFile")
    ReturnData uploadFile(MultipartFile file) throws IOException {
        return uploadFileService.uploadFile(file);
    }
}
